<template>
    <common-page :title="title">
        <div class="mx-auto" v-html="agreementData.content"></div>
    </common-page>
</template>

<script lang="ts" setup>
import { agreementConfig } from "@/api/other";
import commonPage from '@/pages/login/components/page.vue';

definePageMeta({
    layout: false,
});

const agreementData = reactive({
    name: '',
    content: '',
});

const route = useRoute();

const title = computed(() => {
    return agreementData.name;
})

const getData = async () => {
    const data = await agreementConfig({ type: route.query.type });
    agreementData.name = data.name;
    agreementData.content = data.content;
}

getData();

</script>
